Engine control advantageously using humidity

ABSTRACT

A system and method for utilizing a humidity sensor with an internal combustion engine of a vehicle is described. Specifically, information from the humidity sensor is used to adjust a desired air-fuel ratio to reduce engine misfire while improving vehicle fuel economy. Further, such information is also used to adjust timing and/or lift of the valve in the engine cylinder. Finally, diagnostic routines are also described.

FIELD OF THE INVENTION

The field of the present invention relates generally to the control ofengine operation to reduce engine misfire conditions while maximizingengine fuel economy for passenger vehicles driven on the road.

BACKGROUND OF THE INVENTION

Vehicle engines use various sensors to provide information that is thenused to control engine operation for a variety of reasons. One examplesystem, described by U.S. Pat. No. 6,575,148, uses a specific humiditysensor to modify the engine air-fuel ratio, as well as other engineparameters.

The inventors of the present invention have recognized a disadvantagewith such an approach. In particular, such a system can produce degradedresults due to interrelationships between engine misfire, humidity, andthe achievable fuel economy performance. Specifically, the inventors ofthe present invention have recognized that the achievable lean air-fuelratio combustion limit varies as ambient humidity varies. In otherwords, if a lean air-fuel ratio is optimized for low humidity (as leanas possible to maximize fuel economy in low humidity conditions), anincrease in humidity may cause a change in the mixture dilution thatresults in engine misfire. Likewise, if the lean air-fuel ratio is setfor a worst case of high humidity, thereby reducing engine misfires,this results in less vehicle fuel economy and increased emissions on lowhumidity days. As such, operation according to prior approaches resultsin either increased engine misfires, or lost vehicle fuel efficiency andincreased emissions.

SUMMARY OF THE INVENTION

The above disadvantages with prior approaches are overcome by takinginto account ambient humidity in controlling a lean engine air-fuelratio. In one example, by setting the desired lean air-fuel ratio forengine operation based on humidity, it is possible to provide increasedfuel economy and reduced emissions. Specifically, in one example, duringlow humidity conditions, the method allows a more lean, lean air-fuelratio thereby providing increased fuel economy. Likewise, during highhumidity conditions, the method reduces engine misfire by operating witha less lean, lean air-fuel ratio. In this way, operation of thevehicle's engine is optimized in various conditions and takes intoaccount variations of ambient humidity and its effect on engine misfire.As such, increased vehicle fuel economy and reduced vehicle emissionsand misfires can be achieved, even with lean air-fuel operation.

Note that various types of humidity sensors can be used to provideinformation to the engine controller, such as an absolute humiditysensor, a relative humidity sensor, or various others. Also note thatvarious types of engine misfire parameters can be used to adjust thedesired lean air-fuel ratio. For example, an engine misfire limit value,beyond which the desired lean air-fuel ratio is clipped, can be used.Alternatively, the desired lean air-fuel ratio can be a function of thedetermined ambient humidity. Still other options are also possible.

Note finally that various types of fuel injection adjustments can beused to provide the desired lean air-fuel ratio that is adjusted basedon the engine misfire/humidity information. For example, both open loopand/or closed loop air-fuel ratio control can be used. Also, the fuelinjection can be adjusted based on both the desired lean air-fuel ratioand various exhaust gas oxygen sensors coupled in the engine's exhaustsystem.

DESCRIPTION OF THE FIGURES

FIGS. 1A, 1B, and 4 are schematic diagrams of an engine wherein theinvention is used to advantage; and

FIGS. 2-3, 5-7 and 8A-8B are high level flow charts illustratingoperation according to an example embodiment of the invention.

DETAILED DESCRIPTION OF AN EMBODIMENT OF THE INVENTION

Referring to FIG. 1A, internal combustion engine 10, further describedherein with particular reference to FIG. 2, is shown coupled to torqueconverter 11 via crankshaft 13. Torque converter 11 is also coupled totransmission 15 via turbine shaft 17. Torque converter 11 has a bypassclutch (not shown) which can be engaged, disengaged, or partiallyengaged. When the clutch is either disengaged or partially engaged, thetorque converter is said to be in an unlocked state. Turbine shaft 17 isalso known as transmission input shaft. Transmission 15 comprises anelectronically controlled transmission with a plurality of selectablediscrete gear ratios. Transmission 15 also comprise various other gears,such as, for example, a final drive ratio (not shown). Transmission 15is also coupled to tire 19 via axle 21. Tire 19 interfaces the vehicle(not shown) to the road 23.

Internal combustion engine 10 comprising a plurality of cylinders, onecylinder of which is shown in FIG. 1B, is controlled by electronicengine controller 12. Engine 10 includes combustion chamber 30 andcylinder walls 32 with piston 36 positioned therein and connected tocrankshaft 13. Combustion chamber 30 communicates with intake manifold44 and exhaust manifold 48 via respective intake valve 52 and exhaustvalve 54. Exhaust gas oxygen sensor 16 is coupled to exhaust manifold 48of engine 10 upstream of catalytic converter 20.

Intake manifold 44 communicates with throttle body 64 via throttle plate66. Throttle plate 66 is controlled by electric motor 67, which receivesa signal from ETC driver 69. ETC driver 69 receives control signal (DC)from controller 12. Intake manifold 44 is also shown having fuelinjector 68 coupled thereto for delivering fuel in proportion to thepulse width of signal (fpw) from controller 12. Fuel is delivered tofuel injector 68 by a conventional fuel system (not shown) including afuel tank, fuel pump, and fuel rail (not shown).

Engine 10 further includes conventional distributorless ignition system88 to provide ignition spark to combustion chamber 30 via spark plug 92in response to controller 12. In the embodiment described herein,controller 12 is a conventional microcomputer including: microprocessorunit 102, input/output ports 104, electronic memory chip 106, which isan electronically programmable memory in this particular example, randomaccess memory 108, and a conventional data bus.

Controller 12 receives various signals from sensors coupled to engine10, in addition to those signals previously discussed, including:measurements of inducted mass air flow (MAF) from mass air flow sensor110 coupled to throttle body 64; engine coolant temperature (ECT) fromtemperature sensor 112 coupled to cooling jacket 114; a measurement ofthrottle position (TP) from throttle position sensor 117 coupled tothrottle plate 66; a measurement of turbine speed (Wt) from turbinespeed sensor 119, where turbine speed measures the speed of shaft 17,and a profile ignition pickup signal (PIP) from Hall effect sensor 118coupled to crankshaft 13 indicating and engine speed (N).

Continuing with FIG. 2, accelerator pedal 130 is shown communicatingwith the driver's foot 132. Accelerator pedal position (PP) is measuredby pedal position sensor 134 and sent to controller 12.

In an alternative embodiment, where an electronically controlledthrottle is not used, an air bypass valve (not shown) can be installedto allow a controlled amount of air to bypass throttle plate 62. In thisalternative embodiment, the air bypass valve (not shown) receives acontrol signal (not shown) from controller 12.

In addition, an absolute, or relative, humidity sensor 140 is shown formeasuring humidity of the ambient air. This sensor can be located eitherin the inlet air stream entering manifold 44, or measuring ambient airflowing through the engine compartment of the vehicle. Further, in analternative embodiment, a second humidity sensor (141) is shown which islocated in the interior of the vehicle and coupled to a secondcontroller 143 that communicates with controller 12 via line 145. Thediagnostic routines described below herein can be located in controller12, or controller 143, or a combination thereof. Further note that theinterior humidity sensor can be used in a climate control system thatcontrols the climate in the passenger compartment of the vehicle.Specifically, it can be used to control the air-conditioning system, andmore specifically, whether to enable or disable the air-conditioningcompressor clutch which couples the compressor to the engine to operatethe compressor.

As will be appreciated by one of ordinary skill in the art, the specificroutines described below in the flowcharts may represent one or more ofany number of processing strategies such as event-driven,interrupt-driven, multi-tasking, multi-threading, and the like. As such,various steps or functions illustrated may be performed in the sequenceillustrated, in parallel, or in some cases omitted. Likewise, the orderof processing is not necessarily required to achieve the features andadvantages of the invention, but is provided for ease of illustrationand description. Although not explicitly illustrated, one of ordinaryskill in the art will recognize that one or more of the illustratedsteps or functions may be repeatedly performed depending on theparticular strategy being used. Further, these Figures graphicallyrepresent code to be programmed into the computer readable storagemedium in controller 12.

Referring now to FIG. 2, an example routine is described for controllingengine fuel injection based on humidity. First, in step 210, the routinedetermines whether current conditions are for a cold engine start(versus a warm re-start). In other words, the routine determines basedon various factors such as, for example: engine coolant temperature,time since engine start, engine speed, whether current conditionsrepresent the starting of the engine during non warmed-up conditions orcombinations thereof. When the answer to step 210 is yes, the routinecontinues to step 212. In step 212, the routine determines an initiallean air-fuel ratio set-point. This set-point, or desired lean air-fuelratio, is used as described below herein to provide a balance betweenengine fuel economy and reduced emissions. In particular, this desiredlean air-fuel ratio is determined based on various engine operatingparameters, such as, for example: engine coolant temperature (ect),engine air flow (or engine load, or engine torque), measured vehicleemission such as NOx, time since engine start (atmr1) and various otherparameters, or combinations thereof. In one example, the desiredair-fuel ratio (lean_AF_desired) is determined as described in theequation 1 below.lean_(—) AF_desired=tableA (ect, load)+tableB (ect, atmr 1)   EQUATION 1

Note that this desired air-fuel ratio is modified below depending onhumidity, and in this particular example, ambient humidity. While theexact relationship between cam timing and the desired lean air-fuelratio can vary from engine to engine, various testing can be performedto quantify this effect and also take into account the effect ofvariable cam timing, in combination with humidity, on the desired leanair-fuel ratio. In this alternate embodiment, equation 1 would bemodified to include a desired lean air-fuel ratio based on variable camtiming position as well.

The present inventors herein have also recognized that the effect ofhumidity on the residual fraction is substantially linear with humidityin some cases. As such, as described below herein, a linear modifier tothe desired lean air-fuel ratio can be utilized. Note however, thatvarious other modifications can be used depending on the particulareffect of humidity on the lean air-fuel ratio that can be achieved whilereducing engine misfires.

Continuing with FIG. 2, in step 214 the routine determines an ambienthumidity value. In one example, this is the ambient humidity measuredfrom one or both of the humidity sensors. In another example,information from a humidity sensor, in combination with various othersensors, can be used to provide a modified, or estimated, humidityvalue. Then, in step 216, the routine calculates a lean air-fuel ratiolimit that reduces engine misfires based on the humidity and engineoperating conditions. Next, step 218, the desired lean air-fuel ratio,(determined in step 212) is read, taking into account any othermodifications of the desired lean air-fuel ratio due to other enginesystems (such as, for example: temperature modifications, engine speedmodifications, or various others).

In step 220, the routine determines whether the lean air-fuel ratio isgreater than the limit calculated in step 216. If so, the desired leanair-fuel ratio is clipped to the limit in step 222. In this way, it ispossible to adjust the lean air-fuel ratio based on an engine misfireparameter taking into account humidity. The result is that improvedengine fuel economy and reduced emissions can be achieved across avariety of ambient humidities, without sacrificing engine misfires.

In an alternate embodiment, the desired lean air-fuel ratio is adjustedto produce the desired lean air-fuel ratio taking into account potentialengine misfires. In this case, the adjustment as described in equation 2below.lean_(—) AF_misfire=lean_(—) AF_desired−[FNAFHUM(N, load)*(hum_(—)obs-NOMHUM)]  EQUATION 2where, hum_obs=ambient humidity,

-   -   NOMHUM=calibratable nominal humidity for which base schedule is        optimized, usually 50 grams,    -   FNAFHUM (N, load) is the change in A/F desired over the range of        humidity, and    -   N=RPM, or speed of the engine.

In this case, the measured humidity variation from a nominal humidityvalue (NOMHUM) is used as a linear adjustment to a humidity function(FNAFHUM) that is calculated as a function of current engine operatingconditions of engine speed and engine load. This function represents, inone example, a change in the desired lean air-fuel ratio over the rangeof potential humidity experienced in an operating vehicle. Note alsothat this equation 2 can be modified to include an adjustment to thelean air-fuel ratio based on the deviation of the measured humidity froma nominal humidity value multiplied by a function dependent on variablecam timing position.

Continuing with FIG. 2, in step 224, the routine adjusts the fuelinjection amount to the engine based on the clipped desired leanair-fuel ratio. Note that this adjustment can be in either an open loopor closed loop feedback control system. In particular, the fuelinjection amount can be adjusted based on the desired lean air-fuelratio as well as feedback from exhaust gas oxygen sensors located in thevehicle's exhaust.

Referring now to FIG. 3, an alternate embodiment of the presentinvention is described for adjusting a desired lean air-fuel ratio basedon humidity outside of the vehicle. In this example, the engine isoperated at a lean air-fuel ratio during various operating conditions inaddition to engine warm-up conditions after a cold engine start. Inparticular, in step 310, the routine determines whether lean operationhas been enabled after the engine warm up condition. If the answer tostep 310 is YES, the routine continues to step 312. In step 312, theroutine determines whether stratified operation is requested.

Note that stratified operation can be used in directly injected engineswhere the fuel injector is located to directly inject fuel into theengine cylinder. If the answer to step 312 is YES, the routine continuesto step 314 to calculate a desired lean air-fuel ratio based on enginespeed as described in equation 3.lean_(—) AF_desired=tableA(n, load)   EQUATION 3

Alternatively, if homogenous lean operation is selected, then thedesired lean air-fuel ratio is calculated based on equation 4 in step316 using an alternate function of speed and load.lean_(—) AF_desired=tableB(n, load)   EQUATION 4

Next, in step 318, the ambient humidity is read from the sensor, andoptionally modified based on other sensor parameters and operatingconditions. Then, in step 320, the routine adjusts the desired leanair-fuel ratio based on humidity to account for reduced engine misfireas indicated in equation 5.lean_(—) AF_misfire=lean_(—) AF_desired−[FNAFHUM(n, load)*(hum_(—)obs-NOMHUM)]  EQUATION 5

Next, in step 322, the routine determines whether the adjusted desiredlean air-fuel ratio from step 320 has been adjusted past thestoichiometric point. In other words, the routine determines whether theadjustment based on the humidity (to the desired lean air-fuel ratio)has caused the desired lean air-fuel ratio to be adjusted to a richvalue. If such conditions have been indicated, then in step 324 thedesired air-fuel ratio is clipped to the stoichiometric value to reduceinadvertent rich operation. This is indicated as described in equation6.lean_(—) AF_misfire=MAX(lean_(—) AF_misfire, 1.0)   EQUATION 6

Continuing with FIG. 3, in step 326 the routine adjusts the fuelinjection into the engine based on the clipped adjustment of desiredlean air-fuel ratio as described above. In this way, improved fueleconomy, reduced engine misfires, and reduced emissions are achieved.Finally, if lean operation is not enabled and the answer to step 310 isno, the routine continues to step 328 to operate the engine to oscillateabout the stoichiometric value, or to operate rich as desired by engineoperating conditions.

Note that the adjustment of fuel injection based upon the desiredair-fuel ratio can further take into account feedback from exhaust gasoxygen sensors. In other words, the desired air-fuel ratio, along withfeedback from the oxygen sensor, are used in combination to maintain theactual air-fuel ratio at or near the desired value, and to track changesin the desired value due to, for example, changes in humidity.

Referring now to FIG. 4, a routine is described for adjusting cam timing(and thus valve timing) based on humidity, specifically ambienthumidity. Note that this embodiment is directed to changing valve timingby changing cam timing. However, various other valve timing mechanismscan be used. For example, the routine could also adjust intake orexhaust valve lift, intake or exhaust valve timing (e.g., via anelectromechanical valve actuator), intake or exhaust valve cam timing,or adjust a dual equal cam timing which adjusts both intake and exhaustvalve timing via a single overhead cam.

As described above, in internal combustion engines, it is desirable toschedule camshaft timing for best fuel economy and emissions. Thistypically occurs at a cam timing corresponding to high residual fraction(RF), sometimes termed internal EGR (Exhaust Gas Re-circulation). Theextent of residual fraction is also referred to as the charge “dilution”level. Countering this use of high dilution is the tendency for misfirewhen the dilution interferes with spark ignition. As such, the optimalVCT for fuel economy and emissions is usually on one side of the misfirelimit.

Ambient humidity also causes dilution of the engine cylinder chargemixture. Thus if the VCT timing was optimized for low humidity,resulting in being right on the edge of misfire, the addition ofhumidity would push the dilution over the edge into a potential misfirecondition. To avoid this, engines are typically calibrated with the VCTtiming schedule for a worst case high humidity day, avoiding misfires.This, of course, results in less than best fuel economy on lowerhumidity days.

Therefore a humidity sensor, such as an internal or ambient humiditysensor, can be used as described herein. Specifically, if the VCT timingschedule is adjusted for humidity, then the optimal timing for fueleconomy can be delivered at a variety of humidity levels, while reducingmisfire.

Note that cam timing can be controlled as described in U.S. Pat. No.5,609,126, which is incorporated by reference in its entirety herein.However, it is adjusted as described with regard to FIG. 4. An enginewith variable cam timing is shown in FIG. 5.

Referring now specifically to FIG. 4, the desired cam timing from step225 of U.S. Pat. No. 5,609,126 is calculated as described below andadjusted based on humidity. First, in step 410, the routine calculates anominal cam timing (cam_nom) based on speed (n) and load. Then, in step412, the routine calculates an adjustment in cam timing (vct_hum_adj)based on the deviation of measured humidity (hum_obs) from a nominalvalue (NOMHUM). The adjustment is a function of engine parameters, suchas engine speed and load as indicated in FIG. 4. Note that, as above, byusing the deviation from a nominal value, it is potentially possible toreduce the calibration effort if a standardized function FNVCTHUM can bepredetermined based on engine features. Note again that a linearadjustment is used, however various others can also be used based onexperimental testing of the particular engine application.

Then, in step 414, the routine calculates the adjusted desired camtiming (vct_adjusted) based on nominal cam timing and cam timingadjustment as shown in FIG. 4. Then, in step 416, the routine clips theadjusted values to the maximum and/or minimum available cam timing atthe present engine operating conditions.

In this way, it is possible to provide improved emissions and fueleconomy that is not compromised due to variations in ambient humidity.

An alternative embodiment of internal combustion engine 10, is shown inFIG. 5. The engine is controlled by electronic engine controller 12. Inthis embodiment, engine 10 includes a variable valve adjustmentmechanism, which in this example is a variable cam timing mechanism. Asin FIG. 1, engine 10 includes combustion chamber 30 and cylinder walls32 with piston 36 positioned therein and connected to crankshaft 40.Combustion chamber 30 is shown communicating with intake manifold 44 andexhaust manifold 48 via intake valve 52 and exhaust valve 54,respectively. Intake manifold 44 is shown communicating with throttlebody 64 via throttle plate 62. Throttle position sensor 70 measuresposition of throttle plate 62. Exhaust manifold 48 is shown. Intakemanifold 44 is also shown having fuel injector 80 coupled thereto fordelivering liquid fuel in proportion to the pulse width of signal FPWfrom controller 12. Fuel is delivered to fuel injector 80 by aconventional fuel system (not shown) including a fuel tank, fuel pump,and fuel rail (not shown). Alternatively, the engine may be configuredsuch that the fuel is injected directly into the cylinder of the engine,which is known to those skilled in the art as a direct injection engine.Also, as in FIG. 1, an electronically controlled throttle plate can beused.

Distributorless ignition system 88 provides ignition spark to combustionchamber 30 via spark plug 92 in response to controller 12. Two-stateexhaust gas oxygen sensor 16 is shown coupled to exhaust manifold 48upstream of catalytic converter 20. Sensor 16 provides signal EGO tocontroller 12 which converts signal EGO into two-state signal EGOS. Ahigh voltage state of signal EGOS indicates exhaust gases are rich of areference air/fuel ratio and a low voltage state of converted signal EGOindicates exhaust gases are lean of the reference air/fuel ratio.

Controller 12 is shown in FIG. 1 as a microcomputer including:microprocessor unit 102, input/output ports 104, read-only memory 106,random access memory 108, and a conventional data bus. Controller 12 isshown receiving various signals from sensors coupled to engine 10, inaddition to those signals previously discussed, including: enginecoolant temperature (ECT) from temperature sensor 112 coupled to coolingsleeve 114; a measurement of mass air flow measurement (MAF) from massflow sensor 116 coupled to intake manifold 44; and a profile ignitionpickup signal (PIP) from Hall effect sensor 118 coupled to crankshaft40. In one aspect of the present invention, engine speed sensor 119produces a predetermined number of equally spaced pulses everyrevolution of the crankshaft.

Camshaft 130 of engine 10 is shown communicating with rocker arms 132and 134 for actuating intake valve 52 and exhaust valve 54. Camshaft 130is directly coupled to housing 136. Housing 136 forms a toothed wheelhaving a plurality of teeth 138. Housing 136 is hydraulically coupled toan inner shaft (not shown), which is in turn directly linked to camshaft130 via a timing chain (not shown). Therefore, housing 136 and camshaft130 rotate at a speed substantially equivalent to the inner camshaft.The inner camshaft rotates at a constant speed ratio to crankshaft 40.However, by manipulation of the hydraulic coupling as will be describedlater herein, the relative position of camshaft 130 to crankshaft 40 canbe varied by hydraulic pressures in advance chamber 142 and retardchamber 144. By allowing high pressure hydraulic fluid to enter advancechamber 142, the relative relationship between camshaft 130 andcrankshaft 40 is advanced. Thus, intake valve 52 and exhaust valve 54open and close at a time earlier than normal relative to crankshaft 40.Similarly, by allowing high pressure hydraulic fluid to enter retardchamber 144, the relative relationship between camshaft 130 andcrankshaft 40 is retarded. Thus, intake valve 52 and exhaust valve 54open and close at a time later than normal relative to crankshaft 40.

Teeth 138, being coupled to housing 136 and camshaft 130, allow formeasurement of relative cam position via cam timing sensor 150 providingsignal VCT to controller 12. Teeth 1, 2, 3, and 4 are preferably usedfor measurement of cam timing and are equally spaced (for example, in aV-8 dual bank engine, spaced 90 degrees apart from one another), whiletooth 5 is preferably used for cylinder identification, as describedlater herein. In addition, Controller 12 sends control signals (LACT,RACT) to conventional solenoid valves (not shown) to control the flow ofhydraulic fluid either into advance chamber 142, retard chamber 144, orneither.

Relative cam timing is measured using the method described in U.S. Pat.No. 5,548,995, which is incorporated herein by reference. In generalterms, the time, or rotation angle between the rising edge of the PIPsignal and receiving a signal from one of the plurality of teeth 138 onhousing 136 gives a measure of the relative cam timing. For theparticular example of a V-8 engine, with two cylinder banks and a fivetoothed wheel, a measure of cam timing for a particular bank is receivedfour times per revolution, with the extra signal used for cylinderidentification.

Referring now to FIG. 6, a routine is described for taking defaultaction in response to degradation of the humidity sensor. First, in step610, the routine determines whether the humidity sensor has degraded asdescribed below herein with particular reference to FIG. 7.

Next, in step 612, the routine determines whether the sensor hasdegraded beyond a predetermined level. When the answer to step 612 isYES, the routine continues to step 614. In step 614, the routine setsthe measured humidity sensor value in the control code (hum_obs) to thenominal humidity value (NOMHUM). In this way, default settings are usedto control various engine operating conditions, such as, for example:engine air-fuel ratio, engine air-fuel ratio limit values, variable camtiming, exhaust gas recirculation, valve lift, and any combination orsubcombination of these parameters. In particular, since the controlroutines are structured using the deviation of measured humidity from anominal value, this allows for simplified routines in the case ofdefault operation. In other words, as described above, the only actionthat need be taken in response to a degraded humidity sensor is to setthe measured reading to the nominal value. In this way, the routinescontrolling the various engine operations simply operate as if therewere no humidity sensor. In this way, smooth engine operation can beachieved even with humidity sensor degradation, thereby allowingcontinued engine operation.

Note that in one example, not only are default settings used to controlthe variable cam timing and air-fuel ratio limit value if the humiditysensor degrades, but other parameters as well, such as EGR.Specifically, as described in U.S. Pat. No. 6,062,204, (which isincorporated by references herein in its entirety), EGR is scheduledbased on humidity. However, if sensor degradation has occurred, then thehumidity value used for EGR can be set to a level that reduces enginemisfires, such as, for example, 50. Alternatively the equation for EGRcan be modified according to the following formula:Adjusted_(—) egr=base_(—) egr+FN(hum_for_(—) egr).   EQUATION 7

Referring now to FIGS. 7, 8A, and 8B, routines are described fordetermining degradation of the humidity sensor 140. One diagnosticapproach described herein has two humidity sensors with sufficientlydifferent wiring, location, and plant manufacturing batch number thatthey are very unlikely to degrade simultaneously. One diagnostic routinethen consists of verifying that the sensors have the same reading, asdescribed below. When the sensors are in separate locations in thevehicle, certain gates can be applied to narrow the diagnostic tocertain operating regions where high correlation is expected, such asdescribed in FIGS. 8A and 8B. Specifically, in this example, the twohumidity sensors are labeled hum1 and hum2 herein for ease. I.e., sensor140 provide hum 1 (or hum_obs) and sensor 141 provides hum2.

Referring now to FIG. 7, a routine is described for monitoring thesensors 140, and/or 141. Note that the term HUM_DELTA is thecalibratable delta between the two sensors to indicate degradation hasoccurred. For example, it can be set to 10 grains.

First, in step 710, the routine determines whether monitoring of thehumidity sensor(s) has been enabled as described below in twoalternative embodiments (FIGS. 8A and 8B). If monitoring has beenenabled, then in step 720 the routine determines whether the absolutevalue of (hum1-hum2) is greater than HUM_DELTA. If so, degradation isindicated in step 730. Otherwise, sensor operability is indicated instep 740.

A first embodiment to determine whether to enable humidity sensormonitoring is now described with regard to FIG. 8A. Here, the diagnosticis performed upon entering preselected engine operating conditions, suchas: at key-on after a long soak (engine off) time. In this embodiment,the second sensor can be a vehicle interior humidity sensor as describedin FIG. 1. Note that for a short soak, or for vehicle running operation,the interior sensor may read high due to a sweaty driver or other sourceof water vapor in the vehicle. Or, it may be low due to the action of anair conditioning system. As such, after a long soak, a more reliablecomparison is possible. Even then, however, multiple vehicle trips canbe used to increase the reliability of detection. In this way, themonitoring is enabled during selected conditions where both sensorsshould read similar values, and thus improved detection can be achieved.Note that in an alternative embodiment, one (or both) humidity signal(s)can be adjusted based on engine operating conditions to provide a moreaccurate comparison.

Referring now specifically to FIG. 8A, in step 810, the routinedetermines whether the engine soak time is longer than a threshold(SOAK_VALUE). If so, in step 820, diagnosis is enabled.

Note that the engine soak timer is a sensor that indicates the timesince the car was last turned on. This could be based on a timer incontroller 12, for example. The routine of FIG. 8A, in one embodiment,operates only on the first computer loop after a vehicle has theignition key turned on.

A second embodiment performs the diagnostic on a continuous basis. Thiscan be used when such continuous monitoring may be needed to determinedegradation throughout vehicle operation. In this case the interiorhumidity sensor may not be used. Rather, the second humidity sensor isinstalled in the vehicle in a location where it would read close to thesame air stream as the first sensor, whether it is in the engine inletairflow stream or the ambient stream. Again, the electrical circuits canbe designed to minimize the potential of common degradation of thesensors simultaneously. Also, the routine of FIG. 8B can perform thereading of the sensors for diagnosis when they have reached anequilibrium value by using filters, for example.

Referring now specifically to FIG. 8B, in step 830, the routinedetermines whether the time since vehicle key on is greater than athreshold values (TIME_ON_VALUE). If so, in step 840, diagnosis isenabled. Thus, by using the key on time, it is possible to obtain anaccurate reading from both sensors in order to perform the diagnosis.

Note that the routines can be used to monitor either sensor 141 orsensor 143, or both.

This concludes the description of the invention. The reading of it bythose skilled in the art would bring to mind many alterations andmodifications without departing from the spirit and the scope of theinvention. Accordingly, it is intended that the scope of the inventionbe defined by the following claims:

1. A method for controlling an engine in a vehicle having a humidity sensor, the method comprising: determining an engine misfire parameter based on the humidity sensor; setting a desired lean air-fuel ratio based on said misfire parameters; and adjusting a fuel injection amount into the engine based on said set desired lean air-fuel ratio.
 2. The method of claim 1 wherein said humidity sensor is an absolute humidity sensor.
 3. The method of claim 1 wherein said humidity sensor is a relative humidity sensor.
 4. The method of claim 1 wherein said adjusting of said fuel injection amount is further based on feedback from an exhaust gas oxygen sensor.
 5. The method of claim 1 wherein misfire parameter is an engine air-fuel ratio limit value.
 6. The method of claim 1 wherein misfire parameter is further based on engine operating parameters.
 7. The method of claim 1 wherein misfire parameter is based on whether the engine is operating in a startup condition.
 8. The method of claim 1 wherein misfire parameter is based on whether the engine is operating in a cold startup condition.
 9. A method for adjusting engine operation of a vehicle, the method comprising: determining a parameter indicative of ambient humidity outside of the vehicle; determining a desired lean air-fuel ratio based at least on an engine operating condition; calculating an air-fuel ratio adjustment based on said parameter to reduce said desired lean air-fuel ratio toward stoichiometry; and limiting said adjustment of said desired lean air-fuel ratio based on said humidity parameter to approximately a stoichiometric air-fuel ratio.
 10. The method of claim 9 wherein said parameter is based on an absolute humidity sensor.
 11. The method of claim 9 wherein said parameter is based on a relative humidity sensor.
 12. The method of claim 9 wherein said adjusting of said fuel injection amount is further based on feedback from an exhaust gas oxygen sensor.
 13. The method of claim 12 wherein misfire parameter is an engine air-fuel ratio limit value.
 14. The method of claim 13 wherein misfire parameter is further based on engine operating parameters.
 15. The method of claim 13 wherein misfire parameter is based on whether the engine is operating in a startup condition.
 16. The method of claim 13 wherein misfire parameter is based on whether the engine is operating in a cold startup condition.
 17. A computer storage medium having instructions encoded therein for controlling an engine of a powertrain in a vehicle on the road, said medium comprising: code for determining a parameter indicative of ambient humidity outside of the vehicle; code for determining a desired lean air-fuel ratio based at least on an engine operating condition; code for calculating an air-fuel ratio adjustment based on said parameter to reduce said desired lean air-fuel ratio toward stoichiometry; and code for limiting said adjustment of said desired lean air-fuel ratio based on said humidity parameter to substantially a stoichiometric air-fuel ratio. 